import axios from "axios";
import {config} from "../config/index.js";

const get = async function (url, params) {
    return await axios({
        method:'get',
        url:config.host + url,
        params
    })
}

const post = async function(url, data) {
    return await axios({
        method:'post',
        url:config.host + url,
        data
    })
}

export const request = {
    get,
    post
}